<template>
  <avue-crud
    :option="option"
    :data="data"
    v-model="form"
  >
    <template slot-scope="{row}" slot="formGuid">
      <el-button type="text" size="mini" icon="el-icon-download">空白样表</el-button>
      <el-button type="text" size="mini" icon="el-icon-download" style="margin-left: 0">示例样表</el-button>
    </template>
  </avue-crud>
</template>
<script>
export default {
  name: "materialInfo",
  props: {
    materialInfo: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      option: {
        addBtn: false,
        editBtn: false,
        header: false,
        viewBtn: true,
        viewBtnText: '查看更多',
        delBtn: false,
        refreshBtn: false,
        columnBtn: false,
        index: true,
        labelWidth: 110,
        indexLabel: '序号',
        column: [
          {
            label: '材料名称',
            prop: 'materialName',
          },
          {
            label: '材料类型',
            prop: 'materialForm',
            type: 'select',
            hide: true,
            dicData: [
              {
                label: "原件",
                value: "1",
              },
              {
                label: "复印件",
                value: "2",
              },
              {
                label: "原件和复印件",
                value: "3",
              },
            ],
          },
          {
            label: '材料形式',
            prop: 'materialType',
            hide: true,
            type: 'select',
            dicData: [
              {
                label: "纸质",
                value: "1",
              },
              {
                label: "电子",
                value: "2",
              },
              {
                label: "电子、纸质",
                value: "3",
              },
            ],
          },
          {
            label: '表格下载',
            prop: 'formGuid',
            display: false
          },
          {
            label: '来源渠道',
            prop: 'sourceType',
            type: 'select',
            multiple: true,
            dicData: [
              {
                label: "申请人自备",
                value: "10",
              },
              {
                label: "政府部门核发",
                value: "20",
              },
              {
                label: "其他",
                value: "99",
              },
            ],
          },
          {
            label: '来源渠道说明',
            prop: 'sourceExplain',
            hide: true
          },
          {
            label: '材料份数',
            prop: 'pageNum',
          },
          {
            label: '材料规格',
            hide: true,
            prop: 'pageFormat',
          },
          {
            label: '材料必要性',
            prop: 'isNeed',
            type: 'select',
            dicData: [
              {
                label: "是",
                value: "1",
              },
              {
                label: "否",
                value: "0",
              },

            ]
          },
          {
            label: '填报须知',
            prop: 'fillExplian',
            span: 24,
            type: 'textarea'
          },
          {
            label: '受理标准',
            prop: 'acceptStand',
            hide: true,
            span: 24,
            type: 'textarea'
          },
          {
            label: '备注',
            prop: 'remark',
            type: 'textarea',
            hide: true,
            span: 24,
          },
        ]
      },
      data: this.materialInfo,
      form: {}
    }
  }
}
</script>
<style scoped lang="scss">
</style>
